﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace server.threadContext
{
    public class ClientMetaDataContext
    {

        private static ThreadLocal<ClientMetaData> clientMetadataThreadLocal = new ThreadLocal<ClientMetaData>();


        public static void set(ClientMetaData clientMetaData) {
        
            clientMetadataThreadLocal.Value = clientMetaData;
        }

        public static ClientMetaData get()
        {
            return clientMetadataThreadLocal.Value;
        }

        public static void clear() {

            clientMetadataThreadLocal.Value = null;
        }
    }
}
